export const useLayoutStore = defineStore(
  'layoutStore',
  () => {
    const state = reactive({
      isCollapse: false,
    });
    const isCollapse = computed(() => state.isCollapse);
    const toggleCollapse = () => {
      state.isCollapse = !state.isCollapse;
    };

    return {
      state,
      isCollapse,
      toggleCollapse,
    };
  },
  {
    persist: {
      storage: window.localStorage,
      pick: ['state.isCollapse'],
    },
  },
);
